cmake_minimum_required(VERSION 3.21)

# 设置项目名称的变量
set(PROJECT_NAME linux-project-02-cmake-build-project)

# 设置项目名称
project(${PROJECT_NAME})

set(CMAKE_C_STANDARD 11)

# 设置静态库或动态库的生成位置
set(LINK_LIB_PATH ${PROJECT_SOURCE_DIR}/lib)

# 设置可执行程序的生成位置
set(EXECUTABLE_PATH ${PROJECT_SOURCE_DIR}/bin)

# 设置头文件路径
set(INCLUDE_PATH ${PROJECT_SOURCE_DIR}/include)

# 设置静态库或动态库的名称
set(CALCULATE_LIB calculate)
set(SORT_LIB sort)

# 设置可执行程序的名称
set(APPLICATION1 app1)
set(APPLICATION2 app2)

add_subdirectory(calculate)
add_subdirectory(calculate_application)
add_subdirectory(sort)
add_subdirectory(sort_application)